<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.tjtt.common.utils.DateUtilsAll"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String mainid = request.getParameter("mainid");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
<html>
  <head>
    <base target="_self"/>
	<%@ include file="../jslib/jquerylib.jsp" %> 
	<link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jslib/jquery.validate.min.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js"  defer="defer"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/jquery.form.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/additional-methods.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css" />
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/lhgdialog/lhgcore.lhgdialog.min.js?skin=mac"></script>
    <c:if test="${requestScope.message!=null}">
		<script type="text/javascript">
 	 		     alert('<c:out value="${requestScope.message}"></c:out>');
 	 		     window.close();
 		</script>
	</c:if>
	<style type="text/css">
 		body{
 			background:#ffffff; background-image:url(images/);
 			
 		}
   		html{
		    overflow-x: hidden;
			overflow-y: auto;
		}  	
		.formTableNew textarea{border: 1px solid #999;padding: 5px;width: 760px;-moz-border-radius: 3px;border-radius: 3px;margin-bottom: 5px;color: #666;background: url(../images/input_bg.gif) repeat-x top;}
   </style>	
 
  	<script type="text/javascript">
  		var api = frameElement.api, W = api.opener; 
    	var stateValue="";
   		$(document).ready(function(){
		  	     //提交  
		var options1 = {
	  	    url:'<%=request.getContextPath() %>/reportUpdateAction!ReportUpdateFlowFaqi.action?steptype=step1&flowtaskid=${FTaskId}&taskinfoid=${taskinfoid}',
	  	     beforeSubmit: function() {
	   				return true;
	    			},
	  	    dataType:'json',
	  	    success: function(data) {
	  	    //alert(data);
	  	      if(data.result=='success'){
				alert("提交成功");
				/* window.close(); */
				api.close();
				W.reload();
	  	      }
	  	    }};
		//
		$('#saveBtn').click(function(){
		   var datas = window.showModalDialog("<%=request.getContextPath() %>/view/report_update_chooseuer.jsp?jiedian=1",'',"dialogWidth=500px;dialogHeight=300px");
		    var json2 = eval('('+datas+')');
	    	if("close" == json2.state){
	    	    alert("请选择批准人和审核人！");
	    		return false;
	    	}else{
				$("#re_shenheren").val(json2.re_shenheren);
				$("#re_pizhunren").val(json2.re_pizhunren);
	    	}
	    	$('#pageFrom').ajaxSubmit(options1);
	            return false;
    	 });
    	$('#closeBtn').click(function(){
    		api.close(); 
			/* window.close(); */
		});							
	}); 
	
	//查看报告
		function showBG(operate_type){
			var ids = '${ids}';
			var FTaskId = '${FTaskId}';
			var FId = '${requestScope.FId}';
			var returnValue = window.showModalDialog("<%=basePath%>/view/report_update_chakanbaogao.jsp?myrequest=true&ids="+ids+"&taskId="+FTaskId+"&childFlowid="+FTaskId+"&operateType="+operate_type+"&stateid=gcsh&mainid="+FId,'',"dialogWidth=1050px;dialogHeight=650px;scroll:yes");
		}
	
  	</script>
   </head>
  <body>
    <form id="pageFrom" action="" enctype="multipart/form-data" method="post">
    	 <input type="hidden" id="flag" name="flag" />
        <input type="hidden" name="flowid" id="flowid" value="${flowid}" />
     	<input type="hidden" name="stateid" id="stateid" value="${stateid}" />
     	<input type="hidden" name="ids" id="ids" value="${requestScope.ids}" />
     	<input type="hidden" name="FTaskId" id="FTaskId" value="${requestScope.FTaskId}" />
     	<input type="hidden" name="FId" id="FId" value="${requestScope.FId}" />
     	<input type="hidden" id="re_id" name="re_id" value="${requestScope.id}" />
     	<input type="hidden" id="t_id" name="t_id" value="${requestScope.t_id}" />
     	<input type="hidden" id="jiancemudi" name="jiancemudi" value="${requestScope.jiancemudi}" />
     	<input type="hidden" id="baogaono" name="baogaono" value="${baogaono}" />
     	<input type="hidden" id="baogaopath" name="baogaopath" value="${requestScope.baogaopath}" />
     	<input type="hidden" id="re_shenheren" name="re_shenheren" value="" />
     	<input type="hidden" id="re_pizhunren" name="re_pizhunren" value="" />
  		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew" style="padding-top: 20px">
  			 <tr>
			  <td align="right" style="width:80px">流程名称：</td>
	     	  <td align="left">
	     	    <input type="text" id="flowname" name="flowname" maxlength="50" value="报告修改流程" style="border: 1px solid #999;padding: 5px;width:250px;"/>
	     		<img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
	     	  </td>
	     	  <td align="right">申请人：</td>
  			  <td align="left">
  			  	<input type="hidden" id="re_shenqingrenid" name="re_shenqingrenid" value="<%=session.getAttribute("TDM_USER_ID") %>"/>
  			  	<input  type="text"  id="re_shenqingren" maxlength="50"  name="re_shenqingren" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="<%=session.getAttribute("username") %>" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">申请原因：</td>
  			  <td align="left">
  			    <input  type="text" id="re_shenqingyuanyin" maxlength="50" name="re_shenqingyuanyin" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="" />
  			  </td>
  			  <td align="right">申请时间：</td>
  			  <td align="left">
  			    <input  type="text" id="re_shenqingtime" maxlength="50" name="re_shenqingtime" onClick="WdatePicker({maxDate:new Date()})" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="<%=DateUtilsAll.dateToStringShort(new Date()) %>"/>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">更改前内容：</td>
  			  <td align="left">
  			    <input  type="text" id="re_ggqianneirong" maxlength="50" name="re_ggqianneirong" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="" />
  			  </td>
  			  <td align="right">更改后内容：</td>
  			  <td align="left">
  			    <input  type="text" id="re_gghouneirong" maxlength="50" name="re_gghouneirong" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">错误类型：</td>
  			  <td align="left">
  			  	<input  type="radio" name="re_cuowuleixing"  value="结论性差错" />结论性差错
  			  	<input  type="radio" name="re_cuowuleixing"  value="其他" />其他
  			  </td>
  			  <td align="right">委托单号：</td>
  			  <td align="left">
  			    <input  type="text" id="re_weituodanhao" maxlength="50" name="re_weituodanhao" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${requestScope.weituobianhao}" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">委托人：</td>
  			  <td align="left">
  			    <input  type="text" id="re_weituoren" maxlength="50" name="re_weituoren" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${requestScope.weituoren}" />
  			  </td>
  			  <td align="right">委托单位：</td>
  			  <td align="left">
  			    <input  type="text" id="re_weituodanwei" maxlength="50" name="re_weituodanwei" style="border: 1px solid #999;padding: 5px;width: 250px;"  value="${requestScope.weituodanwei}"/>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right" colspan="1" style="width: 150px">是否修改相应的原始记录：</td>
  			  <td align="left" colspan="3">
  			  	<input  type="radio" name="re_shifouxgysjl"  value="是" />是
				<input  type="radio" name="re_shifouxgysjl"  value="否" />否(选择是请填写原始记录识别号和描述)
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">识别号：</td>
  			  <td align="left">
  			    <input  type="text" id="re_ysjlshibieno" maxlength="50" name="re_ysjlshibieno" style="padding: 5px;width: 250px;" value="" />
  			  </td>
  			  <td align="right"> 描述 ：</td>
  			  <td align="left">
  			    <input  type="text" id="re_ysjlmiaoshu" maxlength="50" name="re_ysjlmiaoshu" style="padding: 5px;width: 250px;" value="" />
  			  </td>
  			</tr>
            <tr>   
			<td align="center" colspan="4">
				<input type="button" id="chakanBG" value="查看报告" onclick="showBG('1')" class="form_bt_grey" />
		    	<input id="saveBtn" type="button" value="提 交"  class="form_bt_orange" />
		    	<input type="button" id="closeBtn" value="取 消" class="form_bt_grey" />
		    </td>
		  </tr>
		</table>
	<!--表单结束-->
	</form>
  </body>
</html>
